Skip to content

Conversation

arjavdongaonkar
Copy link
Contributor

🐛 Bug-fix PR

Before opening this PR please:

  1. make lint - passes ruff, mypy, pylint
  2. make test - all unit + integration tests green
  3. make coverage - ≥ 90 %
  4. make docker docker-run-ssl or make podman podman-run-ssl
  5. Update relevant documentation.
  6. Tested with sqlite and postgres + redis.
  7. Manual regression no longer fails. Ensure the UI and /version work correctly.

📌 Summary

Edit Gateway API does not persist the passthrough_headers field from GatewayUpdate.
Although the field exists in the GatewayUpdate model, it is ignored during update and never stored in the DB.

🔁 Reproduction Steps

Create a Gateway Server.
Reopen the "Edit" modal.
Fill in the Passthrough Headers input and hit save
Observe that Passthrough headers are not saved
issue: #867

🐞 Root Cause

This was confirmed in the update_gateway method: while it updates name, url, tags, auth, etc., it never checks gateway_update.passthrough_headers.

💡 Fix Description

Update passthrough headers as well

🧪 Verification

Check Command Status
Lint suite make lint
Unit tests make test
Coverage ≥ 90 % make coverage
Manual regression no longer fails steps / screenshots

📐 MCP Compliance (if relevant)

  • Matches current MCP spec
  • No breaking change to MCP clients

✅ Checklist

  • Code formatted (make black isort pre-commit)
  • No secrets/credentials committed

@crivetimihai crivetimihai force-pushed the fix/passthrough-header-save branch from 22fcf81 to c9fffb8 Compare September 6, 2025 20:40
Copy link
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased

- Add missing passthrough_headers field to DbGateway creation in register_gateway()
- Add method="POST" to add-tool-form, add-resource-form, and add-gateway-form
- Standardize all add form handlers to use fetch() instead of fetchWithTimeout()
- Remove redirect: "manual" option that was interfering with form responses
@crivetimihai crivetimihai force-pushed the fix/passthrough-header-save branch from 7977aaa to 8702a9e Compare September 6, 2025 22:41
@crivetimihai crivetimihai merged commit b4137ff into IBM:main Sep 6, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants